  
  
  
  $("span[class=xia]").mousemove(function(){
        $("div[class=xiazai]").css({
            display:"block"
          
        });
    });
    $("span[class=xia]").mouseout(function(){
        $("div[class=xiazai]").css({
            display:"none"
        });
    });


 	$("ul[class=h]").mouseover(function(){
		$("div[class=huadong]").stop().slideDown(800,function(){
			display:"block"
            
		} );
	} );
	$("ul[class=h]").mouseout(function(){
		$("div[class=huadong]").stop().slideUp(800,function(){
			display:"none"
		} );
	});   

    let oInput = document.querySelector("input");
    let str = ["手机","耳机","投影仪","加湿器","黑鲨4S","小米平板5","笔记本电脑"];
    let i=1;
    oInput.value = str[0]
    setInterval(function(){
        getStr()
    },4000);
    function getStr(){
        oInput.value = str[i];
        i+=1;
        if(i>str.length-1){
            i=0;
        }
    }

   
    ajaxFun("get","./goodsAndShoppingCart/getGoodsList.php",true,"",fun);
    function fun(resText){
        let json = JSON.parse(resText);
        // console.log(json);

            for(let i=0;i<$("header .huadong .cente figure ").length;i++){
            $("header .huadong .cente figure ").eq(i).find("img").attr("src",json[i].goodsImg);
            $("header .huadong .cente figure ").eq(i).find("figcaption").html(json[i].goodsName);
            $("header .huadong .cente figure ").eq(i).find("span").html(json[i].goodsPrice);
        }
        // for(let i=2;i<$("header .huadong .cente .two").length;i++){
        //     $("header .huadong .cente .two ").eq(i).find("img").attr("src",json[i].goodsImg);
        //     $("header .huadong .cente .two").eq(i).find("figcaption").html(json[i].goodsName);
        //     $("header .huadong .cente .two").eq(i).find("span").html(json[i].goodsPrice);
        // }
        

    }
   
   
